import request from "@/utils/request.js"

export async function chatApi(token, data, method) {
	return await request({
		url: "?token="+token,
		data: data,
		method: method ? method : 'post',
		channel: 5,
		contentType: 1
	})
}

export async function chatFileApi(token, data, method) {
	return await request({
		url: "?token="+token,
		data: data,
		method: method ? method : 'post',
		channel: 5,
		contentType: 1,
		responseType: "arraybuffer",
	})
}

export async function nextCloudApi(token) {
	return await request({
		url: "/ocs/v2.php/apps/simplesso/jwt?token="+token,
		method: 'GET',
		channel: 7,
	})
}
